package com.bjpowernode.crm.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 用于WEB-INF下的jsp资源经过请求转发进行显示，否则无法直接访问。
 * 仅用于jsp资源的跳转不涉及业务
 */
@Controller
public class IndexController {
    // 将跳转到项目中首页的地址转发到WEB-INF下的首页
    @RequestMapping("/")
    public String index() {
        return "index";
    }
    // 登录成功后跳转到工作台首页
    @RequestMapping("/workbench/index.do")
    public String toWordbench(){
        return "workbench/index";
    }



    //点击系统设置跳到setting主页
    @RequestMapping("/settings/index.do")
    public String toSettings(){
        return "settings/index";
    }
    //点击数据字典表跳到数据字典主页
    @RequestMapping("/settings/dictionary/index.do")
    public String toDictionary(){
        return "settings/dictionary/index";
    }
    //点击数据字典中的创建按钮跳到数据字典添加页面页
    @RequestMapping("/settings/dictionary/type/tosave.do")
    public String toDictionaryTypeSave(){
        return "settings/dictionary/type/save";
    }

    @RequestMapping("/test/ajax.do")
    public Object test(){
//        Student student = new Student("张三", 23);
        String name = "success";
        return "success";
    }
}
